home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Visual Database / Visual dBase Pro v7.0 / DATA1.CAB / Sample_dBASE / Fish.rep < prev    next >
Encoding:
Text File  |  1997-11-20  |  8.0 KB  |  324 lines

  1. //--------------------------------------------------------------
  2. //
  3. //  Fish.rep --  Fish of the World 
  4. //
  5. //  A detail report of the fish table with a background
  6. //  image and rotated text.
  7. //
  8. //  Dependencies: FISH.DBF
  9. //                WATER2.BMP
  10. //                Times New Roman True Type Font
  11. //
  12. //  Visual dBASE Samples Group
  13. //
  14. //  $Revision:   1.5  $
  15. //
  16. //  Copyright (c) 1997, Borland International, Inc. 
  17. //  All rights reserved.
  18. //
  19. //---------------------------------------------------------------
  20.  
  21. SET TALK OFF
  22. ** END HEADER -- do not remove this line
  23. //
  24. // Generated on 10/09/97
  25. //
  26. local r
  27. r = new FISHReport()
  28. r.render()
  29.  
  30. class FISHReport of REPORT
  31.    with (this)
  32.       title = "Fish of the World"
  33.       scaleFontSize = 8
  34.       scaleFontBold = false
  35.    endwith
  36.  
  37.  
  38.    this.SESSIONFISH = new SESSION()
  39.    this.SESSIONFISH.parent = this
  40.    with (this.SESSIONFISH)
  41.       left = 0
  42.       top = 0
  43.       lockRetryInterval = 0
  44.    endwith
  45.  
  46.  
  47.    this.VDBSAMPLE1 = new DATABASE()
  48.    this.VDBSAMPLE1.parent = this
  49.    with (this.VDBSAMPLE1)
  50.       left = 500
  51.       top = 0
  52.       databaseName = "VDBSAMPLE"
  53.       session = form.SESSIONFISH
  54.       active = true
  55.    endwith
  56.  
  57.  
  58.    this.FISH1 = new QUERY()
  59.    this.FISH1.parent = this
  60.    with (this.FISH1)
  61.       left = 1000
  62.       top = 0
  63.       database = form.vdbsample1
  64.       sql = 'select * from "fish.dbf"'
  65.       requestLive = false
  66.       active = true
  67.    endwith
  68.  
  69.  
  70.  
  71.  
  72.    this.PAGETEMPLATE1 = new PAGETEMPLATE(this)
  73.    with (this.PAGETEMPLATE1)
  74.       height = 15840
  75.       width = 12240
  76.       marginTop = 720
  77.       marginLeft = 720
  78.       marginBottom = 720
  79.       marginRight = 720
  80.       gridLineWidth = 0
  81.       background = 'filename "Water2.bmp"'
  82.    endwith
  83.  
  84.  
  85.    this.PAGETEMPLATE1.STREAMFRAME1 = new STREAMFRAME(this.PAGETEMPLATE1)
  86.    with (this.PAGETEMPLATE1.STREAMFRAME1)
  87.       height = 12000
  88.       left = 800
  89.       width = 8900
  90.       metric = 1
  91.       form.STREAMFRAME1 = form.pagetemplate1.streamframe1
  92.    endwith
  93.  
  94.  
  95.    this.PAGETEMPLATE1.TEXT3 = new TEXT(this.PAGETEMPLATE1)
  96.    with (this.PAGETEMPLATE1.TEXT3)
  97.       height = 240
  98.       left = 360
  99.       top = 13140
  100.       width = 1570
  101.       metric = 1
  102.       colorNormal = "BtnText"
  103.       fontSize = 11
  104.       fontBold = true
  105.       text = {||"Page: " + this.parent.parent.reportPage}
  106.       form.TEXT3 = form.pagetemplate1.text3
  107.    endwith
  108.  
  109.  
  110.    this.PAGETEMPLATE1.TEXT4 = new TEXT(this.PAGETEMPLATE1)
  111.    with (this.PAGETEMPLATE1.TEXT4)
  112.       height = 10000
  113.       top = 100
  114.       width = 700
  115.       metric = 1
  116.       colorNormal = "darkblue"
  117.       alignHorizontal = 1
  118.       fontName = "Times New Roman"
  119.       fontSize = 20
  120.       rotate = 3
  121.       text = "<H2>Fish of the World          Fish of the World</H2>"
  122.       form.TEXT4 = form.pagetemplate1.text4
  123.    endwith
  124.  
  125.  
  126.    this.STREAMSOURCE1 = new STREAMSOURCE(this)
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.    this.STREAMSOURCE1.detailBand.TEXTID1 = new TEXT(this.STREAMSOURCE1.detailBand)
  134.    with (this.STREAMSOURCE1.detailBand.TEXTID1)
  135.       height = 300
  136.       top = 250
  137.       width = 1000
  138.       metric = 1
  139.       colorNormal = "darkblue"
  140.       alignHorizontal = 2
  141.       fontName = "Times New Roman"
  142.       fontSize = 11
  143.       fontBold = true
  144.       text = {||"Fish #: " + this.form.fish1.rowset.fields["ID"].value}
  145.    endwith
  146.  
  147.  
  148.    this.STREAMSOURCE1.detailBand.TEXTNAME1 = new TEXT(this.STREAMSOURCE1.detailBand)
  149.    with (this.STREAMSOURCE1.detailBand.TEXTNAME1)
  150.       height = 300
  151.       left = 1101
  152.       top = 250
  153.       width = 2500
  154.       metric = 1
  155.       colorNormal = "darkblue"
  156.       fontName = "Times New Roman"
  157.       fontSize = 11
  158.       fontBold = true
  159.       text = {||this.form.fish1.rowset.fields["NAME"].value}
  160.    endwith
  161.  
  162.  
  163.    this.STREAMSOURCE1.detailBand.TEXTSPECIES1 = new TEXT(this.STREAMSOURCE1.detailBand)
  164.    with (this.STREAMSOURCE1.detailBand.TEXTSPECIES1)
  165.       height = 300
  166.       left = 4001
  167.       top = 250
  168.       width = 3250
  169.       metric = 1
  170.       colorNormal = "darkblue"
  171.       fontName = "Times New Roman"
  172.       fontSize = 11
  173.       fontBold = true
  174.       text = {||"Species: " + this.form.fish1.rowset.fields["SPECIES"].value}
  175.    endwith
  176.  
  177.  
  178.    this.STREAMSOURCE1.detailBand.TEXTDESCRIPTION1 = new TEXT(this.STREAMSOURCE1.detailBand)
  179.    with (this.STREAMSOURCE1.detailBand.TEXTDESCRIPTION1)
  180.       height = 1
  181.       left = 100
  182.       top = 600
  183.       width = 7800
  184.       border = true
  185.       metric = 1
  186.       variableHeight = true
  187.       colorNormal = "black"
  188.       marginHorizontal = 100
  189.       marginVertical = 100
  190.       fontSize = 8
  191.       fontBold = true
  192.       text = {||this.form.fish1.rowset.fields["DESCRIPTION"].value + CHR(10) + CHR(13)}
  193.       borderStyle = 10
  194.    endwith
  195.  
  196.  
  197.    this.STREAMSOURCE1.detailBand.TITLEIMAGEGRAPHIC1 = new TEXT(this.STREAMSOURCE1.detailBand)
  198.    with (this.STREAMSOURCE1.detailBand.TITLEIMAGEGRAPHIC1)
  199.       canRender = {||this.parent.firstOnFrame}
  200.       height = 300
  201.       left = 15408
  202.       width = 1440
  203.       metric = 1
  204.       colorNormal = "BtnText"
  205.       suppressIfBlank = true
  206.       text = "<H3>Graphic</H3>"
  207.    endwith
  208.  
  209.  
  210.    with (this.printer)
  211.       duplex = 1
  212.       orientation = 1
  213.       paperSource = 15
  214.       paperSize = 1
  215.       resolution = 4
  216.       color = 2
  217.       trueTypeFonts = 2
  218.    endwith
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226.    with (this.reportGroup.footerBand)
  227.       expandable = false
  228.       height = 2000
  229.    endwith
  230.  
  231.  
  232.    this.reportGroup.footerBand.LABELMAX = new TEXT(this.reportGroup.footerBand)
  233.    with (this.reportGroup.footerBand.LABELMAX)
  234.       height = 250
  235.       left = 2000
  236.       top = 500
  237.       width = 2000
  238.       metric = 1
  239.       colorNormal = "b+"
  240.       fontSize = 11
  241.       fontBold = true
  242.       text = "Biggest Fish:"
  243.    endwith
  244.  
  245.  
  246.    this.reportGroup.footerBand.MAXLENGTH = new TEXT(this.reportGroup.footerBand)
  247.    with (this.reportGroup.footerBand.MAXLENGTH)
  248.       height = 240
  249.       left = 4500
  250.       top = 500
  251.       width = 1500
  252.       metric = 1
  253.       variableHeight = true
  254.       colorNormal = "b+"
  255.       fontSize = 11
  256.       fontBold = true
  257.       text = {||this.parent.parent.agMax({||this.parent.STREAMSOURCE1.rowset.fields["Length CM"].value}) + " CM"}
  258.    endwith
  259.  
  260.  
  261.    this.reportGroup.footerBand.LABELCOUNT = new TEXT(this.reportGroup.footerBand)
  262.    with (this.reportGroup.footerBand.LABELCOUNT)
  263.       height = 250
  264.       left = 2000
  265.       top = 1500
  266.       width = 2000
  267.       metric = 1
  268.       colorNormal = "b+"
  269.       fontSize = 11
  270.       fontBold = true
  271.       text = "Number of Fish:"
  272.    endwith
  273.  
  274.  
  275.    this.reportGroup.footerBand.FISHCOUNT = new TEXT(this.reportGroup.footerBand)
  276.    with (this.reportGroup.footerBand.FISHCOUNT)
  277.       height = 250
  278.       left = 4500
  279.       top = 1500
  280.       width = 1500
  281.       metric = 1
  282.       variableHeight = true
  283.       colorNormal = "b+"
  284.       fontSize = 11
  285.       fontBold = true
  286.       text = {||this.parent.parent.agCount({||this.parent.STREAMSOURCE1.rowset.fields["Length CM"].value})+""}
  287.    endwith
  288.  
  289.  
  290.    this.reportGroup.footerBand.LABELMIN = new TEXT(this.reportGroup.footerBand)
  291.    with (this.reportGroup.footerBand.LABELMIN)
  292.       height = 250
  293.       left = 2000
  294.       top = 1000
  295.       width = 2000
  296.       metric = 1
  297.       colorNormal = "b+"
  298.       fontSize = 11
  299.       fontBold = true
  300.       text = "Smallest Fish:"
  301.    endwith
  302.  
  303.  
  304.    this.reportGroup.footerBand.MINLENGTH = new TEXT(this.reportGroup.footerBand)
  305.    with (this.reportGroup.footerBand.MINLENGTH)
  306.       height = 250
  307.       left = 4500
  308.       top = 1000
  309.       width = 1500
  310.       metric = 1
  311.       variableHeight = true
  312.       colorNormal = "b+"
  313.       fontSize = 11
  314.       fontBold = true
  315.       text = {||this.parent.parent.agMin({||this.parent.STREAMSOURCE1.rowset.fields["Length CM"].value}) + " CM"}
  316.    endwith
  317.  
  318.  
  319.    this.firstPageTemplate = this.form.pagetemplate1
  320.    this.form.pagetemplate1.nextPageTemplate = this.form.pagetemplate1
  321.    this.form.pagetemplate1.streamframe1.streamSource = this.form.STREAMSOURCE1
  322.    this.form.STREAMSOURCE1.rowset = this.form.fish1.rowset
  323. endclass
  324.